package com.fh.common;

import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;


@ControllerAdvice
public class ExceptionController {
    @ExceptionHandler(Exception.class)
    @ResponseBody
    public com.fh.common.ResultData exception(Exception e){
        e.printStackTrace();
        return com.fh.common.ResultData.error(500,e.getMessage());
    }
}
